< previous page page_272 next page >

Page 272
In this lesson, you will learn how to use the SELECT_FROM statement to select data from one or more tables and present that information in a single table for update or review. You will also learn how to limit the data you select to only the records that meet your criteria using the WHERE clause. You'll learn how to easily reorder the data in tables using the ORDER BY clause. You will also learn how to create simple statements that automatically summarize and total the data using the GROUP BY_HAVING clause.
You will learn about typical SQL functions to manipulate numbers and strings. This lesson also covers advanced DML statements such as PARAMETERS, UNIONS, JOINS, and TRANSFORM_PIVOT.
Today, you will create actual SQL queries (and in some cases, store them for later use) using the Visual Basic Visdata program you learned about on Day 7.
What Is SQL?
Before jumping into specific SQL statements and their use, you should understand the definition of SQL and its uses and origins. SQL stands for Structured Query Language. It was developed in the 1970s at IBM as a way to provide computer users with a standardized method for selecting data from various database formats. The intent was to build a language that was not based on any existing programming language, but could be used within any programming language as a way to update and query information in databases.
Note.gif
The word SQL should be pronounced ess-que-ell instead of sequel. The confusion about the pronunciation of the word stems from the database language's origin. The SQL language is a successor of a language called Sequel developed by IBM in the late 1960s. For this reason, many (especially those familiar with IBM's Sequel language) continued to pronounce the name of the new database language improperly.

SQL statements are just thatstatements. Each statement can perform operations on one or more database objects (tables, columns, indexes, and so on). Most SQL statements return results in the form of a set of data records, commonly referred to as a view. SQL is not a particularly friendly language. Many programs that use SQL statements hide these statements behind point-and-click dialogs, query-by-example grids, and other user-friendly interfaces. Make no mistake, however, that if the data you are accessing is stored in a relational database, you are using SQL statements, whether you know it or not.

 
< previous page page_272 next page >

If you like this book, buy it!